package com.changgou.test.lock;

import java.util.UUID;
import java.util.concurrent.TimeUnit;

public class test2 {
    public static void main(String[] args) {

        for (int i = 0; i < 10; i++ ) {
            new Thread(() -> {
                try {
                 String sj = UUID.randomUUID().toString().substring(0,5);
                    System.out.println(sj);
                    TimeUnit.SECONDS.sleep(1);
                } catch (InterruptedException e) {
                    e.printStackTrace();
                }
            }, String.valueOf(i)).start();
        }

    }
}
